<%--
    Document   : form_isi_data
    Created on : Nov 9, 2012, 5:27:45 PM
    Author     : Rico
--%>

    

<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.PreparedStatement"%>
<%@page import="java.sql.Connection"%>
<%@page import="bunga.KoneksiDatabase"%>


<%
            if (request.getParameter("idPesanan").equals("")) {
                response.sendRedirect(request.getParameter("hb") + "?error=");
            } else {

%>

<html xmlns="http://www.w3.org/1999/xhtml">

    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>Cek Status Pesanan</title>
    <link href='http://fonts.googleapis.com/css?family=Oswald:400,300' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Abel|Satisfy' rel='stylesheet' type='text/css'>
    <link href="style.css" rel="stylesheet" type="text/css" media="screen" />
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>Karangan Bunga Online</title>
        </head>
        <body>
            <div id="wrapper">
                <div id="header-wrapper">
                    <div id="header" class="container">
                        <div id="menu">
                            <ul>
                                <li><a href="home.jsp" class="selected">Home</a></li>
                                <li><a href="aboutUs.jsp" class="selected">About Us</a></li>
                                <li><a href="ourLocation.jsp" class="selected">Our Location</a></li>
                                <li><a href="cek_status.jsp">Cek Status Pesanan</a></li>
                            </ul>
                        </div>
                    </div>
                    <div id="banner">
                        <div class="content"><img src="images/header.jpg" width="1000" height="220" alt="" /></div>
                    </div>
                </div>
                <div id="featured-content">

                    <center>
                        <%
                                    String id = request.getParameter("idPesanan");
                                    if (id != null) {
                                        String query = "select status from DATAPESANAN where IDPESANAN = '" + id + "'";
                                        Connection conn = new KoneksiDatabase().getDBConnection();
                                        PreparedStatement ps = conn.prepareStatement(query);
                                        ResultSet rs = ps.executeQuery();
                                        if (rs.next()) {
                                            out.print(rs.getString(1));
                                        }else{ out.print("Maaf ID Pemesanan Anda Salah ");
                                    }
                        %>
                    </center>
                </div>
            </div>

            <div id="footer">
                <p>Copyright (c) 2012. All rights reserved.<br />Designed & Developed by <a href="http://www.facebook.com/yulius.ferdian" target="_blank">Yulius</p>
            </div>
        </body>
    </html>
    <%}}%>